<script setup lang="ts">
import { defineProps, withDefaults } from "vue";

interface Prop {
  userList: any[];
}

const props = withDefaults(defineProps<Prop>(), {
  userList: () => [],
});
</script>

<template>
  用户列表
  <a-list item-layout="horizontal" :data-source="props.userList">
    <template #renderItem="{ item }">
      <a-list-item>
        <a-card hoverable style="width: 240px">
          <template #cover>
            <img
              alt="example"
              src="https://img1.baidu.com/it/u=4095719093,1652846533&fm=253&fmt=auto&app=120&f=JPEG?w=707&h=500"
            />
          </template>
          <a-card-meta :title="item.userName">
            <template #description>{{ item.userProfile }}</template>
          </a-card-meta>
        </a-card>
      </a-list-item>
    </template>
  </a-list>
</template>

<style scoped></style>
